
<script>
	export default {
		onLaunch: function() {
			console.log('App Launch')
			
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style>
	/*每个页面公共css */
</style>
<script>
import {login} from './services'
	export default {
		onLaunch: function() {
			wx.login({
				success:async res=>{
					let result=await login(res.code)
					console.log(result,'用户登录信息');
					wx.setStorageSync('key',result.data.openid)
				}
			})
		},
		onShow: function() {
		},
		onHide: function() {
		}
	}
</script>

<style>
	/*每个页面公共css */
	page{
		width: 100%;
		height: 100%;
	}
</style>

